package com.test.prolenders.analytics_prolenders.util_prolenders

import android.app.Application
import com.test.prolenders.analytics_prolenders.data_sdk_prolenders.ASBuilder_prolenders
import com.test.prolenders.analytics_prolenders.data_sdk_prolenders.ASSycManager_prolenders
import com.test.prolenders.util_prolenders.UserInfoUtil_prolenders

object SycDeviceUtil_prolenders {

    /**
     * 初始化设备信息模块
     *
     * @param context Application
     */
    fun init(context: Application) {
        try {

            ASBuilder_prolenders.setLog(false)
            // 初始化
            ASSycManager_prolenders.getInstance().init(context)

        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

    /**
     * 保存设备 s2s信息
     */
    fun saveS2SInfo() {
        try {
            if (UserInfoUtil_prolenders.getInstance().didLogin()) {
                ASSycManager_prolenders.getInstance().sycData {}
            }
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }
}